#### Figure 3

rm(list=ls())

# Load required package
library(igraph)

# Working directory
setwd("~/Dropbox/Paraguay/1_data/7_replication_dataverse")

# Create family network data
s <- data.frame(
  family1 = c("Sarubbi", "Sarubbi", "Sarubbi", "Sarubbi", 
              "Ciancio", "Ciancio", "Ciancio", "Rossi"),
  family2 = c("Lepretti", "Ciancio", "Donnadia", "Rossi", 
              "Lepretti", "Rossi", "Donnadia", "Donnadia")
)

# Create igraph object and simplify
net.ig <- graph_from_data_frame(s, directed = FALSE)


# Create df file
pdf("figures/figure3.pdf")

# Set margins
par(mar = c(0.2, 0.2, 0.2, 0.2))

# Create plot
plot(net.ig, 
     edge.arrow.size = .1, 
     edge.curved = 0,
     vertex.size = 15, 
     vertex.label.cex = 1.25,
     vertex.label.dist = 2.5, 
     edge.color = "grey40",
     vertex.color = "darkred", 
     vertex.frame.color = "#ffffff", 
     vertex.label.color = "black",
     layout = layout.circle)


dev.off()

